#include "MoreBlocks.h"

#include "App/Game.h"


void MoreBlocks::OnInit()
{
  LOG_INFO("Plugin: \"{}\" Init", GetName());

  auto reg = Game::GetInstance().GetLevel()->GetBlockRegistry();
  reg->RegisterBlock({"water", Block::RenderType::SemiTransparent, Block::BlockModelType::Luqid, glm::vec4(0.216, 0.325, 0.655, 1)});
  reg->RegisterBlock({"glass", Block::RenderType::Transparent, Block::BlockModelType::Full, glm::vec4(0.996, 0.996, 0.996, 1)});
  reg->RegisterBlock({"furnace", Block::RenderType::Opaque, Block::BlockModelType::Full, glm::vec4(0.498, 0.498, 0.498, 1)});
  reg->RegisterBlock({"grass", Block::RenderType::Opaque, Block::BlockModelType::NotFull, glm::vec4(0.498, 0.498, 0.498, 1)});
  Block torch = {"torch", Block::RenderType::Opaque, Block::BlockModelType::NotFull, glm::vec4(0.498, 0.498, 0.498, 1)};
  torch.lightLevel = 14;
  reg->RegisterBlock(torch);
}